package cn.itcast.bos.service.base.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.itcast.bos.dao.base.StandardRepository;
import cn.itcast.bos.domain.base.Standard;
import cn.itcast.bos.service.base.StandardService;

/**
 * 收派标准添加service实现类
 *
 * @author 朱志强
 * @version 1.0 2017年9月3日下午8:47:13
 */
@Service
@Transactional
public class StandardServiceImpl implements StandardService {
	
	//创建dao层对象
	@Autowired
	private StandardRepository standardRepository;
	
	@Override
	public void save(Standard standard) {  
		
		//调用dao层
		standardRepository.save(standard);
		
	}

	@Override
	public Page<Standard> findPageData(Pageable pageable) {
		
		//diaoyongdao层,并将结果返回
		return standardRepository.findAll(pageable);
	}

}
